package cn.com.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.com.entity.UserVo;
import cn.com.service.UserService;

/**
 * @author liufl E-mail:Huberier@allpyra.com
 * @version 创建时间：2017年8月3日 上午11:39:48 类说明
 */
@RestController
public class UserController {

	@Autowired
	UserService userService;

	@RequestMapping(value = "/users")
	public ResponseEntity<List<UserVo>> readUserInfo() {
		List<UserVo> users = userService.searchAll();
		return new ResponseEntity<List<UserVo>>(users, HttpStatus.OK);
	}

}